package com.itheima.web.controller.system;

import com.github.pagehelper.PageInfo;
import com.itheima.service.system.SysLogService;
import com.itheima.web.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@RequestMapping("system/log")
@Controller
public class SyslogCotroller extends BaseController{
    @Autowired
    SysLogService sysLogService;
    @RequestMapping("list")
    public String list(@RequestParam(defaultValue = "1") int page,@RequestParam(defaultValue = "3") int size){
        PageInfo pageInfo= sysLogService.queryAllLog(page,size);
        request.setAttribute("page",pageInfo);
        return "system/log/log-list";
    }
}